Optimal. Leaf size=72 \[ -\frac {f \log \left (c \left (d+e x^2\right )^p\right )}{x}+g x \log \left (c \left (d+e x^2\right )^p\right )+\frac {2 p (d g+e f) \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d} \sqrt {e}}-2 g p x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 93, normalized size of antiderivative = 1.29, number of steps used = 7, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {2476, 2448, 321, 205, 2455} \[ -\frac {f \log \left (c \left (d+e x^2\right )^p\right )}{x}+g x \log \left (c \left (d+e x^2\right )^p\right )+\frac {2 \sqrt {e} f p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d}}+\frac {2 \sqrt {d} g p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}-2 g p x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 205
Rule 321
Rule 2448
Rule 2455
Rule 2476
Rubi steps
\begin {align*} \int \frac {\left (f+g x^2\right ) \log \left (c \left (d+e x^2\right )^p\right )}{x^2} \, dx &=\int \left (g \log \left (c \left (d+e x^2\right )^p\right )+\frac {f \log \left (c \left (d+e x^2\right )^p\right )}{x^2}\right ) \, dx\\ &=f \int \frac {\log \left (c \left (d+e x^2\right )^p\right )}{x^2} \, dx+g \int \log \left (c \left (d+e x^2\right )^p\right ) \, dx\\ &=-\frac {f \log \left (c \left (d+e x^2\right )^p\right )}{x}+g x \log \left (c \left (d+e x^2\right )^p\right )+(2 e f p) \int \frac {1}{d+e x^2} \, dx-(2 e g p) \int \frac {x^2}{d+e x^2} \, dx\\ &=-2 g p x+\frac {2 \sqrt {e} f p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d}}-\frac {f \log \left (c \left (d+e x^2\right )^p\right )}{x}+g x \log \left (c \left (d+e x^2\right )^p\right )+(2 d g p) \int \frac {1}{d+e x^2} \, dx\\ &=-2 g p x+\frac {2 \sqrt {e} f p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d}}+\frac {2 \sqrt {d} g p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {f \log \left (c \left (d+e x^2\right )^p\right )}{x}+g x \log \left (c \left (d+e x^2\right )^p\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 62, normalized size = 0.86 \[ \left (g x-\frac {f}{x}\right ) \log \left (c \left (d+e x^2\right )^p\right )+\frac {2 p (d g+e f) \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d} \sqrt {e}}-2 g p x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.71, size = 199, normalized size = 2.76 \[ \left [-\frac {2 \, d e g p x^{2} + \sqrt {-d e} {\left (e f + d g\right )} p x \log \left (\frac {e x^{2} - 2 \, \sqrt {-d e} x - d}{e x^{2} + d}\right ) - {\left (d e g p x^{2} - d e f p\right )} \log \left (e x^{2} + d\right ) - {\left (d e g x^{2} - d e f\right )} \log \relax (c)}{d e x}, -\frac {2 \, d e g p x^{2} - 2 \, \sqrt {d e} {\left (e f + d g\right )} p x \arctan \left (\frac {\sqrt {d e} x}{d}\right ) - {\left (d e g p x^{2} - d e f p\right )} \log \left (e x^{2} + d\right ) - {\left (d e g x^{2} - d e f\right )} \log \relax (c)}{d e x}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.19, size = 78, normalized size = 1.08 \[ \frac {2 \, {\left (d g p + f p e\right )} \arctan \left (\frac {x e^{\frac {1}{2}}}{\sqrt {d}}\right ) e^{\left (-\frac {1}{2}\right )}}{\sqrt {d}} + \frac {g p x^{2} \log \left (x^{2} e + d\right ) - 2 \, g p x^{2} + g x^{2} \log \relax (c) - f p \log \left (x^{2} e + d\right ) - f \log \relax (c)}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.77, size = 403, normalized size = 5.60 \[ -\frac {\left (-g \,x^{2}+f \right ) \ln \left (\left (e \,x^{2}+d \right )^{p}\right )}{x}+\frac {-i \pi g \,x^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )+i \pi g \,x^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{2}+i \pi g \,x^{2} \mathrm {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{2}-i \pi g \,x^{2} \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{3}+i \pi f \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )-i \pi f \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{2}-i \pi f \,\mathrm {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{2}+i \pi f \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{3}-4 g p \,x^{2}+2 g \,x^{2} \ln \relax (c )-2 f \ln \relax (c )+2 x \RootOf \left (d^{2} g^{2} p^{2}+2 d e f g \,p^{2}+e^{2} f^{2} p^{2}+d \,\textit {\_Z}^{2} e \right ) \ln \left (\left (-d^{2} g p -d e f p \right ) \RootOf \left (d^{2} g^{2} p^{2}+2 d e f g \,p^{2}+e^{2} f^{2} p^{2}+d \,\textit {\_Z}^{2} e \right )+\left (2 d^{2} g^{2} p^{2}+4 d e f g \,p^{2}+2 e^{2} f^{2} p^{2}+3 \RootOf \left (d^{2} g^{2} p^{2}+2 d e f g \,p^{2}+e^{2} f^{2} p^{2}+d \,\textit {\_Z}^{2} e \right )^{2} d e \right ) x \right )}{2 x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.99, size = 61, normalized size = 0.85 \[ -2 \, e p {\left (\frac {g x}{e} - \frac {{\left (e f + d g\right )} \arctan \left (\frac {e x}{\sqrt {d e}}\right )}{\sqrt {d e} e}\right )} + {\left (g x - \frac {f}{x}\right )} \log \left ({\left (e x^{2} + d\right )}^{p} c\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.33, size = 83, normalized size = 1.15 \[ \ln \left (c\,{\left (e\,x^2+d\right )}^p\right )\,\left (2\,g\,x-\frac {g\,x^2+f}{x}\right )-2\,g\,p\,x+\frac {2\,p\,\mathrm {atan}\left (\frac {2\,\sqrt {e}\,p\,x\,\left (d\,g+e\,f\right )}{\sqrt {d}\,\left (2\,d\,g\,p+2\,e\,f\,p\right )}\right )\,\left (d\,g+e\,f\right )}{\sqrt {d}\,\sqrt {e}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 46.00, size = 262, normalized size = 3.64 \[ \begin {cases} \left (- \frac {f}{x} + g x\right ) \log {\left (0^{p} c \right )} & \text {for}\: d = 0 \wedge e = 0 \\- \frac {f p \log {\relax (e )}}{x} - \frac {2 f p \log {\relax (x )}}{x} - \frac {2 f p}{x} - \frac {f \log {\relax (c )}}{x} + g p x \log {\relax (e )} + 2 g p x \log {\relax (x )} - 2 g p x + g x \log {\relax (c )} & \text {for}\: d = 0 \\\left (- \frac {f}{x} + g x\right ) \log {\left (c d^{p} \right )} & \text {for}\: e = 0 \\\frac {i \sqrt {d} g p \log {\left (d + e x^{2} \right )}}{e \sqrt {\frac {1}{e}}} - \frac {2 i \sqrt {d} g p \log {\left (- i \sqrt {d} \sqrt {\frac {1}{e}} + x \right )}}{e \sqrt {\frac {1}{e}}} - \frac {f p \log {\left (d + e x^{2} \right )}}{x} - \frac {f \log {\relax (c )}}{x} + g p x \log {\left (d + e x^{2} \right )} - 2 g p x + g x \log {\relax (c )} + \frac {i f p \log {\left (d + e x^{2} \right )}}{\sqrt {d} \sqrt {\frac {1}{e}}} - \frac {2 i f p \log {\left (- i \sqrt {d} \sqrt {\frac {1}{e}} + x \right )}}{\sqrt {d} \sqrt {\frac {1}{e}}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________